enum {
PROP_0,
PROP_ANIMATED,
+ PROP_AFFECTS,
PROP_AFFECTS_SIZE,
PROP_AFFECTS_FONT,
PROP_ID,
case PROP_ANIMATED:
property->animated = g_value_get_boolean (value);
break;
+ case PROP_AFFECTS:
+ property->affects = g_value_get_flags (value);
+ break;
case PROP_AFFECTS_SIZE:
property->affects_size = g_value_get_boolean (value);
break;
case PROP_ANIMATED:
g_value_set_boolean (value, property->animated);
break;
+ case PROP_AFFECTS:
+ g_value_set_flags (value, property->affects);
+ break;
case PROP_AFFECTS_SIZE:
g_value_set_boolean (value, property->affects_size);
break;
P_("Set if the value can be animated"),
FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+ g_object_class_install_property (object_class,
+ PROP_AFFECTS,
+ g_param_spec_flags ("affects",
+ P_("Affects"),
+ P_("Set if the value affects the sizing of elements"),
+ GTK_TYPE_CSS_AFFECTS,
+ 0,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (object_class,
PROP_AFFECTS_SIZE,
g_param_spec_boolean ("affects-size",
return property->animated;
}
+/**
+ * _gtk_css_style_property_get_affects:
+ * @property: the property
+ *
+ * Returns all the things this property affects. See @GtkCssAffects for what
+ * the flags mean.
+ *
+ * Returns: The things this property affects.
+ **/
+GtkCssAffects
+_gtk_css_style_property_get_affects (GtkCssStyleProperty *property)
+{
+ g_return_val_if_fail (GTK_IS_CSS_STYLE_PROPERTY (property), 0);
+
+ return property->affects;
+}
+
/**
* _gtk_css_style_property_affects_size:
* @property: the property
node = g_object_new (GTK_TYPE_CSS_STYLE_PROPERTY,
"value-type", value_type,
+ "affects", affects,
"affects-size", (affects & (GTK_CSS_AFFECTS_CLIP | GTK_CSS_AFFECTS_SIZE)) ? TRUE : FALSE,
"affects-font", (affects & GTK_CSS_AFFECTS_FONT) ? TRUE : FALSE,
"animated", (flags & GTK_STYLE_PROPERTY_ANIMATED) ? TRUE : FALSE,
GtkCssValue *initial_value;
guint id;
+ GtkCssAffects affects;
guint inherit :1;
guint animated :1;
guint affects_size :1;
gboolean _gtk_css_style_property_is_inherit (GtkCssStyleProperty *property);
gboolean _gtk_css_style_property_is_animated (GtkCssStyleProperty *property);
+GtkCssAffects _gtk_css_style_property_get_affects (GtkCssStyleProperty *property);
gboolean _gtk_css_style_property_affects_size (GtkCssStyleProperty *property);
gboolean _gtk_css_style_property_affects_font (GtkCssStyleProperty *property);
guint _gtk_css_style_property_get_id (GtkCssStyleProperty *property);
*
* Note that multiple values can be set.
*/
-typedef enum /*< skip >*/ {
+typedef enum {
GTK_CSS_AFFECTS_FOREGROUND = (1 << 0),
GTK_CSS_AFFECTS_BACKGROUND = (1 << 1),
GTK_CSS_AFFECTS_BORDER = (1 << 2),